package 代码记录.Bit48天集训;

import java.util.*;

/**1.乒乓球筐
 * 2.查找兄弟单词
 * @author zx
 * @create 2022-07-05 19:09
 */
public class day_45 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String line = sc.nextLine();
            String[] arr = line.split(" ");
            String A = arr[0];
            String B = arr[1];
            int[] mapA = new int[26];
            int[] mapB = new int[26];
            //统计字符串A中字符出现的次数
            for(int i = 0;i < A.length();i++){
                mapA[A.charAt(i) - 'A']++;
            }
            //统计字符串B中字符出现的次数
            for(int i = 0;i < B.length();i++){
                mapB[B.charAt(i) - 'A']++;
            }
            boolean res = true;
            for(int i = 0;i < B.length();i++){
                int index = B.charAt(i) - 'A';
                if(mapA[index] ==0 || mapA[index] < mapB[index]){
                    res = false;
                    break;
                }
            }
            if(res){
                System.out.println("Yes");
            }else{
                System.out.println("No");
            }
        }
    }

    /**
     * 做出来了
     */
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String line = sc.nextLine();
            String[] arr = line.split(" ");
            int n = Integer.valueOf(arr[0]);
            int k = Integer.valueOf(arr[arr.length - 1]);
            String x = arr[arr.length - 2];
            List<String> list = new ArrayList<>();
            for(int i = 1;i <= n;i++){
                if(!x.equals(arr[i]) && x.length() == arr[i].length() && isBrother(arr[i],x)){
                    list.add(arr[i]);
                }
            }
            String[] res = new String[list.size()];
            for(int i = 0;i < res.length;i++){
                res[i] = list.get(i);
            }
            Arrays.sort(res);
            if(k - 1 >= res.length){
                System.out.println(res.length);
            }else{
                System.out.println(res.length);
                System.out.println(res[k - 1]);
            }
        }
    }
    private static boolean isBrother(String a,String b){
        char[] arrA = a.toCharArray();
        char[] arrB = b.toCharArray();
        Arrays.sort(arrA);
        Arrays.sort(arrB);
        if(String.valueOf(arrA).equals(String.valueOf(arrB))){
            return true;
        }else{
            return false;
        }
    }
}
